package nl.saxion.security.gui.elements;

import java.io.File;

import javax.swing.JPanel;

import nl.saxion.security.event.Event;

public abstract class AbstractPathPanel extends JPanel {

	private static final long serialVersionUID = 8025384405758091108L;
	
	public static final int STYLE_FILE_OPEN = 1;
	public static final int STYLE_FILE_SAVE = 2;
	
	public static final String EVENT_CHOOSEN_FILE_CHANGED = "ChoosenFileChanged";
	
	public static final String ARGUMENT_CHOOSEN_FILE = "choosenFile";
	
	private int style = STYLE_FILE_OPEN;
	
	protected Event createChoosenFileEvent(File choosenFile)
	{
		Event e = new Event(EVENT_CHOOSEN_FILE_CHANGED);
		e.setArgument(ARGUMENT_CHOOSEN_FILE, choosenFile);
		return e;
	}
	
	
	
	public int getFileChooseStyle()
	{
		return style;
	}
	
}
